<?
require_once("../conn.php");

//get the details
$q1 = "select * from job_employer_info where ename = '$_SESSION[ename]' ";
$r1 = mysql_query($q1) or die(mysql_error());
$a1 = mysql_fetch_array($r1);

if(ereg($_GET[file], $a1['CompanyLogo']))
{
	
	if($_GET[file] != "no.jpg")
	{
	//delete the file
	unlink("../re_images/$_GET[file]");
  }
	
	$q2 = "update job_employer_info set CompanyLogo = 'no.jpg' where ename = '$_SESSION[ename]' ";
	mysql_query($q2) or die(mysql_error());
}

header("location:EditInfo.php?");
exit();

?>